﻿<%@ Page Title="" Language="C#" MasterPageFile="MasterPage.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="default_main">
        
        <asp:SqlDataSource ID="AccessDataSource1" runat="server" ConnectionString="Data Source=.;Initial Catalog=QLBanHang;Integrated Security=True"
            SelectCommand="SELECT TOP 1 * FROM Product WHERE Active = 1 ORDER BY EnterEveryDay DESC">
        </asp:SqlDataSource>
        <div style="clear: both">
        </div>
        
    </div>

    <%--=============================================================================================================================--%>

    <div style="height: 50px; float: left; width: 250px; margin-top: 50px; font-size: x-large;
        color: Green; position: relative;">
        <strong style="position: absolute; top: 10px;">New Products </strong>
        <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="css/images/news-button.png" PostBackUrl="Product.aspx" CssClass=newbutton/>
    </div>
    <div style="clear:both"></div>
    <div style="width:auto;margin:auto;">
        <asp:DataList ID="DataList2" runat="server" DataKeyField="ProductCode" 
            DataSourceID="AccessDataSource2" OnItemCommand="XuLy" RepeatColumns="4" CssClass=Product_main >
            <ItemTemplate>
                <div class="prod_box" style="float:left">
                    <div class="top_prod_box">
                    </div>
                    <div class="center_prod_box">
                        <div class="product_title">
                            <span>
                                <asp:Label ID="ProductNameLabel" runat="server" Text='<%# Eval("ProductName") %>' /></span>
                        </div>
                        <div class="product_img">
                            <asp:Image ID="Image2" runat="server" Height="110px" ImageUrl='<%# Eval("Avatar", "{0}") %>'
                                Width="110px" CssClass="product_img" />
                        </div>
                        
                        <div class="prod_price">
                            <span class="price">
                                <asp:Label ID="UnitPriceLabel" runat="server" Text='<%# Eval("UnitPrice") %>' /> USD</span>
                        </div>
                    </div>
                    <div class="bottom_prod_box">
                    </div>
                    <div class="prod_details_tab" align="center">
                        <asp:Label ID="lblLike" runat="server" Text=<%# Eval("LikeNumber") %> CssClass=like></asp:Label>
                        <asp:ImageButton ID="imgbtnLike" runat="server" ImageUrl="css/images/like.png" CommandName=Like />
                       <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/User/images/cart.png" CommandName="ThemGioHang" />
                        <a href=Detail.aspx?ProductCode=<%#Eval("ProductCode") %>>Detail</a>
                    </div>
                    <div style="clear:both"></div>
                </div>
            </ItemTemplate>
        </asp:DataList>
        <asp:SqlDataSource ID="AccessDataSource2" runat="server" ConnectionString="Data Source=.;Initial Catalog=QLBanHang;Integrated Security=True"
            SelectCommand="SELECT TOP 4 * FROM Product WHERE Active = 1 ORDER BY EnterEveryDay DESC">
        </asp:SqlDataSource>
    </div>

    <%--=============================================================================================================================--%>

</asp:Content>
